
        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>/public/assets/css/package.css">
  
        <div class="weui_navbar">
            <div class="weui_navbar_item <?php if(empty($type) || $type == 0 )echo 'weui_bar_item_on'?>" onclick="tiaozhuan(0);">
                全部
            </div>
            <div class="weui_navbar_item <?php if($type == 1)echo 'weui_bar_item_on'?>" onclick="tiaozhuan(1);">
                未用完
            </div>
            <div class="weui_navbar_item <?php if($type == 2)echo 'weui_bar_item_on'?>" onclick="tiaozhuan(2);">
                已用完
            </div>
        </div>
        <ul style="display: block;">
        <?php foreach ($order_list as $val){?>
            <li>
                <p><?php echo $val['book_title']?>
                <span class="<?php if($val['surplus_hours']<=0)echo 'done'?>">
                <?php if($val['status']==0){?>待支付
                <?php }elseif ($val['status']==2){?>已退款
                <?php }elseif ($val['status']==3){?>划课待审核
                <?php }elseif ($val['status']==4){?>划课审核失败
                <?php }elseif ($val['status']==6){?>已过期
                <?php }else{ echo $val['surplus_hours']<=0 ? '已用完' :'未用完'; }?>
                </span></p>
                <p>共<em><?php echo $val['hours']?></em>课时，剩余<em><?php echo $val['surplus_hours']?></em>课时</p>
                <div>
                    <a href="/coursepackage/info?order_id=<?php echo $val['order_id']?>" class="weui_btn weui_btn_mini weui_btn_default">查看详情</a>
                    
                    <?php if($val['status']==0){?>
                    <a class="weui_btn weui_btn_mini weui_btn_default" href="<?php echo base_url()?>order/go_pay/?order_id=<?php echo id_encode($val['id'])?>">立即支付</a>
                    <?php }elseif( ($val['status']==1 || $val['status']==5) && $val['surplus_hours'] > 0){?>
                    <a href="/purchasecourse/?order_id=<?php echo $val['order_id']?>" class="weui_btn weui_btn_mini weui_btn_default">立即约课</a>
                    <?php }?>
                </div>
            </li>
        <?php }?>
<!--             <li> -->
<!--                 <p>0-3岁探索课程精选包<span class="done">已用完</span></p> -->
<!--                 <p>共<em>3</em>课时，剩余<em>2</em>课时</p> -->
<!--                 <div> -->
<!--                     <a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_primary">查看详情</a> -->
<!--                     <a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_primary">立即约课</a> -->
<!--                 </div> -->
<!--             </li> -->
        </ul>
<!--     <div class="weui_dialog_confirm" id="dialog1"> -->
<!--         <div class="weui_mask"></div> -->
<!--         <div class="weui_dialog"> -->
<!--             <div class="weui_dialog_hd"><strong class="weui_dialog_title">弹窗标题</strong></div> -->
<!--             <div class="weui_dialog_bd">自定义弹窗内容，居左对齐显示，告知需要确认的信息等</div> -->
<!--             <div class="weui_dialog_ft"> -->
<!--                 <a href="javascript:;" class="weui_btn_dialog default">取消</a> -->
<!--                 <a href="javascript:;" class="weui_btn_dialog primary">确定</a> -->
<!--             </div> -->
<!--         </div> -->
<!--     </div> -->

    <script type="text/javascript">
//         $(document).ready(function(){
//             $(".weui_navbar_item").bind("click",function(){
//                 var _index = $(this).index();
//                 var _ul =$("ul").get(_index);
//                 var path_a = $(".weui_navbar_item");
//                 path_a.not($(this).addClass("weui_bar_item_on")).removeClass("weui_bar_item_on");
//             });
//         });
        //跳转
        function tiaozhuan(type){
        	window.location.href="/coursepackage/cplist?type="+type;
        }
    </script>
